var webpack = require('webpack');
var path = require ('path');
var proxy = require('http-proxy-middleware')
 module.exports={
     entry:'./index.js',
     output:{
        publicPath:'',
        filename:'bundle.js'
     },
     module:{
         loaders:[
             {
                 test:/\.js$/,
                 exclude:/node_modules/,
                 loader:'babel-loader?presets[]=es2015&presets[]=react&presets[]=stage-0'
             }
         ]
     },
     devServer:{
         proxy:{
             '/api':{
                 target:'http://api.douban.com',
                 pathRewrite:{'^/api':'/'},
                 changeOrigin:true
             }
         }
     }
 }